<template>
	<u-popup v-model="realShow" mode="center" border-radius="14" :mask-close-able="false">
		<view class="dialog">
			<text class="title">设备配网</text>
			<view class="content">
				<view class="loader">
					<image class="img" :src="$IMAGE_BASE_URL + '/static/ic_blue_search.gif'"></image>
				</view>
				<text v-if="text" class="text">{{text}}</text>
			</view>
		</view>
	</u-popup>
</template>

<script>
	export default {
		props: {
			show: {
				type: Boolean,
				default: false,
			},
			text: {
				type: String,
				default: "",
			}
		},
		data() {
			return {
				realShow: false
			}
		},
		watch: {
			show: {
				handler(val) {
					this.realShow = val;
				},
				immediate: true,
				deep: true,
			}
		}
	}
</script>

<style lang="scss" scoped>
	.dialog {
		width: 617rpx;
		// height: 357rpx;
		background: #FFFFFF;
		border-radius: 38rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		position: relative;

		.title {
			font-size: 35rpx;
			color: #000000;
			font-weight: bold;
			margin-top: 50rpx;
			margin-bottom: 20rpx;
		}

		.content {
			width: 517rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			margin-bottom: 50rpx;

			.loader {
				width: 100rpx;
				height: 100rpx;
				position: relative;

				.img {
					width: 100%;
					height: 100%;
				}
			}

			.text {
				font-size: 30rpx;
				color: #010101;
				margin-top: 30rpx;
			}
		}
	}
</style>